//
//  KZVC2.m
//  lg_zhinengbeikao_english
//
//  Created by 朱凯 on 2018/12/10.
//  Copyright © 2018年 zhukai. All rights reserved.
//

#import "KZVC2.h"
#import "KZVC3.h"


@interface KZVC2 ()

@end

@implementation KZVC2

- (void)viewDidLoad {
    [super viewDidLoad];

    self.view.backgroundColor = UIColor.whiteColor;
    [self addLeftBackBarButtonItem];
    
    UIButton *button2 = [UIButton buttonWithType:UIButtonTypeCustom];
    button2.titleLabel.font = FONT(14);
    [button2 setTitle:@"push vc2" forState:UIControlStateNormal];
    [button2 setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [button2 addTarget:self action:@selector(event2) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button2];
    [button2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.height.mas_equalTo(@80);
        make.left.mas_equalTo(40);
        make.top.mas_equalTo(80);
    }];
    
    UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];
    button1.titleLabel.font = FONT(14);
    [button1 setTitle:@"push vc3" forState:UIControlStateNormal];
    [button1 setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [button1 addTarget:self action:@selector(event1) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button1];
    [button1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.height.mas_equalTo(@80);
        make.right.mas_equalTo(-40);
        make.top.mas_equalTo(80);
    }];
    
    UIButton *button3 = [UIButton buttonWithType:UIButtonTypeCustom];
    button3.titleLabel.font = FONT(14);
    [button3 setTitle:@"modal vc2" forState:UIControlStateNormal];
    [button3 setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [button3 addTarget:self action:@selector(event3) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button3];
    [button3 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.height.mas_equalTo(@80);
        make.left.mas_equalTo(40);
        make.top.mas_equalTo(200);
    }];
    
    UIButton *button4 = [UIButton buttonWithType:UIButtonTypeCustom];
    button4.titleLabel.font = FONT(14);
    [button4 setTitle:@"modal vc3" forState:UIControlStateNormal];
    [button4 setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [button4 addTarget:self action:@selector(event4) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button4];
    [button4 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.height.mas_equalTo(@80);
        make.right.mas_equalTo(-40);
        make.top.mas_equalTo(200);
    }];
    
    
    
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self setNaviAttributeWithTranslucent:true stateBarLightContent:true];
}

- (void)event1 {
    KZVC3 *vc = [KZVC3 new];
    [self push:vc];
}
- (void)event2 {
    KZVC2 *vc = [KZVC2 new];
    [self push:vc];
}
- (void)event3 {
    KZVC2 *vc = [KZVC2 new];
    [self present:vc withBackInteractive:false];
}
- (void)event4 {
    KZVC3 *vc = [KZVC3 new];
    [self present:vc withBackInteractive:true];
}



@end
